package wen;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("[DOWNLOADER] Welcome to run the downloader.");
        Scanner scanner=new Scanner(System.in);
        System.out.println("[DOWNLOADER] Enter the path to save files:");
        String path= scanner.next();
        System.out.println("[DOWNLOADER] Enter the file name:");
        String fileName=scanner.next();
        System.out.println("[DOWNLOADER] Enter the file url:");
        String urlString=scanner.next();
        Downloader downloader=new Downloader(path,"");
        downloader.addATask(urlString,fileName);
        String start="";
        while(!start.equals("start")){
            System.out.println("[DOWNLOADER] Enter start to start task.");
            start= scanner.next();
        }
        downloader.run();
        System.out.println("[DOWNLOADER] Download task finished.");
    }
}
